﻿using System;

namespace HotelRegistrationSystem.Models
{
    public class ReservationModel
    {
        public int ReservationId { get; set; }

        public DateTime DateCreated { get; set; }

        public int UserId { get; set; }

        public string UserName { get; set; }

        public DateTime StartDate { get; set; }

        public DateTime EndDate
        {
            get
            {
                return StartDate.AddDays(this.Period);
            }
        }
        public int Period { get; set; }

        public int BedCount { get; set; }

        public int ReservationStatusId { get; set; }

        public string StatusName{ get; set; }

        public string HotelName { get; set; }

        public string RoomName { get; set; }

        public int RoomId { get; set; }

        public int RoomsCount { get; set; }

        public int HotelId { get; set; }

        public Decimal? Price { get; set; }


        public string DateCreatedStr
        {
            get
            {
                return DateCreated.ToString("dd-MM-yyyy");
            }
        }
        
        public string StartDateSrt
        {
            get
            {
                return StartDate.ToString("dd-MM-yyyy");
            }
        }

        public string EndDateSrt
        {
            get
            {
                return EndDate.ToString("dd-MM-yyyy");
            }
        }
    }

    public class ReservationStatusModel
    {
        public int ReservationId { get; set; }
        public int StatusId { get; set; }
    }
}